using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;

namespace CoreCalc.GUI
{
    public partial class FunctionsChangedWarning : Form
    {
        private List<string> selectedFunctions;

        public FunctionsChangedWarning(String[] alteredFunctions)
        {
            InitializeComponent();
            checkedListBox1.Items.AddRange(alteredFunctions);
            for (int i = 0; i < checkedListBox1.Items.Count; i++)
                checkedListBox1.SetItemChecked(i, true);
        }

        public List<string> SelectedFunctions
        {
            get { return selectedFunctions; }
        }

        private void OkButton_Click(object sender, EventArgs e)
        {
            this.DialogResult = DialogResult.OK;
            selectedFunctions = new List<string>();
            foreach (string s in this.checkedListBox1.CheckedItems)
            {
                selectedFunctions.Add(s);
            }
            Close();
        }
    }
}